/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */

import type { MaSearchItem } from "@mineadmin/search";
import MaDictSelect from "@/components/ma-dict-picker/ma-dict-select.vue";

export default function getSearchItems(t: any): MaSearchItem[] {
  return [
    {
      label: "商户名称",
      prop: "merchant_name",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "商户名称" }) },
    },
    {
      label: "资质类型",
      prop: "qualification_type",
      render: () => MaDictSelect,
      renderProps: {
        data: [
          { label: "食品经营许可证", value: 1 },
          { label: "卫生许可证", value: 2 },
          { label: "消防许可证", value: 3 },
          { label: "其他证书", value: 4 },
        ],
        placeholder: t("form.pleaseInput", { msg: "资质类型" }),
        clearable: true,
        multiple: false,
      },
    },
    {
      label: "资质名称",
      prop: "qualification_name",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "资质名称" }) },
    },
    {
      label: "资质证书号",
      prop: "qualification_id",
      render: "input",
      renderProps: { multiple: false },
    },
    {
      label: "发证机关",
      prop: "issuing_authority",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "发证机关" }) },
    },
  ];
}
